package com.zoe.onelink.common.model;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * 分页对象--存放分页请求参数及分页结果信息
 * @param <T> 分页查询的实体对象
 */
@Data
@Accessors(chain = true)
public class PageInfo<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    public PageInfo() {
    }

    public PageInfo(Long pageIndex, Long pageSize) {
        this.pageIndex = pageIndex;
        this.pageSize = pageSize;
    }

    /** 页码 */
    private Long pageIndex = 1L;
    /** 分页大小 */
    private Long pageSize = 10L;
    /** 总数*/
    private Long total;
    /** 分页结果数据*/
    private List<T> rows;

}